import {createApp} from 'vue'
import {createPinia} from 'pinia'

import App from '@/App.vue'
import router from '@/router'

import '@/assets/main.css'
import {get, post} from '@/api/http.js'
import {format} from 'date-fns/fp'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/theme-chalk/dark/css-vars.css'
const app = createApp(App)
app.config.globalProperties.get = get
app.config.globalProperties.post = post
app.config.globalProperties.post = post
app.config.globalProperties.$filters = {
    dateTime(value) {
        return value ? format('yyyy-MM-yy HH:mm:ss', new Date(value)): ""
    }
}
app.use(ElementPlus, {
    locale: zhCn,
})
app.use(createPinia())
app.use(router)
app.mount('#app')
